/*
 * 计算总分和平均分（3分）
 */

#include <stdio.h>

int main() {
	setbuf(stdout, NULL);

	int detail[2][5] = {86, 74, 92, 77, 82, 81, 87, 90, 62, 88};
	float total = (float) 0.0, average;

	// note: 统计总分
	for (int i = 0; i < 2; i++) {
		if (i == 0) {
			for (int j = 0; j < 5; ++j) {
				total += (float) 0.3 * (float) detail[i][j];
			}
		} else {
			for (int j = 0; j < 5; ++j) {
				total += (float) 0.7 * (float) detail[i][j];
			}
		}
	}

	// note: 计算平均分
	average = total / 5;

	// 输出结果
	printf("total=%.2f\n", total);
	printf("average=%.2f\n",average);
	printf("average=%d\n", (int )average);

	return 0;
}